<p>Using certain features of regular expressions, it is possible to create regular expressions that can never match or contain subpatterns that can
never match. Since a pattern or sub-pattern that can never match any input is pointless, this is a sign that the pattern does not work as intended and
needs to be fixed.</p>
<p>This rule finds some such regular expressions and subpatterns, specifically ones that meet one of the following conditions:</p>
<ul>
  <li> Beginning- and end-of-line/input boundaries appearing in a position where they can never match (e.g. an end-of-input marker being followed by
  other characters) </li>
  <li> A back reference refers to a capturing group that will never be matched before the back reference </li>
</ul>
<h2>Noncompliant Code Example</h2>
<h3>Boundaries</h3>
<pre>
$[a-z]*^
</pre>
<h3>Backreference</h3>
<pre>
\1(.)
</pre>
<h2>Compliant Solution</h2>
<h3>Boundaries</h3>
<pre>
^[a-z]*$
</pre>
<h3>Backreference</h3>
<pre>
(.)\1
</pre>

